package com.exercise240710.mapper;

import com.exercise240710.DTO.StudentPhysicalDTO;
import com.exercise240710.entity.StudentInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface StudentInfoMapper {
    public StudentInfo selectById(Long id);

    public StudentInfo selectByIdSeq(String id_seq);

    public List<StudentInfo> selectStudentByCondition(
            Long min_id, Long max_id, String id_seq,
            String name, String gender, Short min_age,
            Short max_age, String school, Integer min_student_num,
            Integer max_student_num, String subject, String phone,
            String email, String live_place, String iban,
            Long offset, Integer pageSize
    );

    public List<StudentPhysicalDTO> findStudentPhysicalJoin(
            Long min_id, Long max_id, String id_seq,
            String name, String gender, Short min_age,
            Short max_age, String school, Integer min_student_num,
            Integer max_student_num, String subject, String phone,
            String email, String live_place, String iban,
            Long offset, Integer pageSize
    );

    public int updateStudent(String id_seq,
                             String name, String gender, Short age,
                             String school, Integer student_num, String subject,
                             String phone, String email, String live_place,
                             String iban
    );

    public int insertStudent(String id_seq,
                             String name, String gender, Short age,
                             String school, Integer student_num, String subject,
                             String phone, String email, String live_place,
                             String iban);

    public int deleteStudentByIdSeq(String id_seq);
}
